//
//  KDNewsRequestTool.m
//  YuQingXiaoFang
//
//  Created by wangdongdong on 18/6/8.
//  Copyright © 2018年 KDTech. All rights reserved.
//

#import "KDNewsRequestTool.h"
#import "KDBaseTool.h"

#import "KDNewsListParam.h"
#import "KDBaseResult.h"
#import "KDNewsListResult.h"
@implementation KDNewsRequestTool

/**   资讯列表 */
+ (void)getNewsListWithParam:(KDNewsListParam *)param success:(void (^)(KDNewsListResult *responseObejct))success failure:(void(^)(NSError *error))failure{
    param.method = @"app/pushnews/findPageList";
    NSString *url = [NSString stringWithFormat:@"%@%@",FrontServiceAddr,param.method];
    [KDBaseTool get:url param:param resultClass:[KDNewsListResult class] success:success failure:failure];
    
}
/**   图片完整路径 */
+(id)getNewsImageUrlWithParam:(NSString*) arrayStr{
    NSArray *array=[arrayStr componentsSeparatedByString:@";"];
    NSString *baseUrl = [NSString stringWithFormat:@"%@%@%@",FrontServiceAddr,@"/app/interface/viewPicByFSUrl?fileUrl=",array[0]];
    return baseUrl;
}
@end
